package com.iwhalecloud.uncc.mq.producer;

import com.ctg.mq.api.exception.MQProducerException;
import com.iwhalecloud.uncc.model.MqClusterConfig;

public interface MqProducer {
	/**
     * 发送普通消息
     */
	Object sendMsg(String topic, String tag, String key, String msg) throws Exception;

    /**
     * 发送顺序消息
     */
    Object sendOrderlyMsg(String topic, String tag, String key, String msg, String orderlyKey) throws Exception;

    void init(MqClusterConfig mqConfig);

    void destroy();



    /**
     * 发送普通消息
     */
    Object sendMsg(String topic, String tag, String key, String msg, boolean compress) throws Exception;
    Object sendMsg(String topic, String tag, String key, byte[] msgArr) throws Exception;
    /**
     * 发送顺序消息
     */
    Object sendOrderlyMsg(String topic, String tag, String key, String msg, String orderlyKey, boolean compress) throws Exception;


}
